<?

$srcDbMstPos    = "POS";
$srcDbMstDept   = "DEPARTMENT";
$srcDbMstAccess = "USER_ACCESS";
$srcDbMstCompany= "USERID_COMPANY";

$Db = new oracleDb;
$Db->init($_SESSION["ORCLU"],
           $_SESSION["OPASS"],
           $_SESSION["SID"],
           _NO_COMMENT);

$propPassword = $GJs->jsOnFocus("setYellow2(this);").

                $GJs->jsOnBlur ("setWhite2(this);
                                 Misc.vldPassword(\"usrPwdEnt\",
                                                  \"usrPwdReEnt\");");

$propGroup    = $GJs->jsOnFocus("setYellow2(this);").

                $GJs->jsOnBlur ("setWhite2(this);
                                 Ajax.groupAlloc();");

if($Db->connect()){

  $CLFetchers->fetchLstPos($Db,
                           $srcDbMstPos,
                           $nPos,
                           $lstPos);

  $CLFetchers->fetchLstDept($Db,
                            $srcDbMstDept,
                            $nDept,
                            $lstDept);

  $CLFetchers->fetchLstCompany($Db,
                               $srcDbMstCompany,
                               $nCompany,
                               $lstCompany);

  $lstStatus = array("1","0");

  $propUsrId = $GJs->jsOnFocus("setYellow2(this);").

               $GJs->jsOnBlur ("setWhite2(this);
                                Ajax.isIdExists(this);");

  echo 	//Global misc function of js
        "<SCRIPT LANGUAGE=\"JavaScript\" SRC=\"../javascript/misc.js\"></SCRIPT> \n".
        "<SCRIPT LANGUAGE=\"JavaScript\" SRC=\"../javascript/GMisc.js\"></SCRIPT> \n".

        //This modul misc.js collections of function
        "<SCRIPT LANGUAGE=\"JavaScript\" SRC=\"javascript/misc.js\"></SCRIPT> \n".

        //The ajax connections
        "<SCRIPT LANGUAGE=\"JavaScript\" SRC=\"javascript/ajax.js\"></SCRIPT> \n".

        "<SCRIPT LANGUAGE=\"JavaScript\" SRC=\"../javascript/CalendarPopup.js\"></SCRIPT> \n".
  			"<SCRIPT LANGUAGE=\"JavaScript\">\n".
  			"var cal      = new CalendarPopup();\n".
  			"var gStatus    = Array();\n".
  			"    gStatus[0] = false;\n".
  			"</SCRIPT> \n".

  			"<link rel=\"stylesheet\" type=\"text/css\" href=\"../myMenu.css\"/>\n".

   			/**
   			* Since this is to prevent default 'enter'
   			*
   			*/
   			"<body >\n".
   			"<form  name='initMe' action=entry.php method=post>\n".

   			/**
   			* Global header
   			*
   			*/
  			"<table border='1' class='dedeq' >\n".
  			"<tr>\n".

  			  "<th> ID          </th><td> ".$GHtml->formInput("usrIdEnt",
  			                                                  $_POST["usrIdEnt"],
  			                                                  $propUsrId)." </td>\n".

  			"</tr>\n".
  			"<tr>\n".

  			  "<th> NAME        </th><td> ".$GHtml->formInput("usrNmEnt",
  			                                                  $_POST["usrNmEnt"],
  			                                                  $Misc->stdProperties())." </td>\n".

  			"</tr>\n".
  			"<tr>\n".

  			  "<th> PASSWORD    </th><td> ".$GHtml->formInputPwd("usrPwdEnt",
    			                                                   $_POST["usrPwdEnt"],
    			                                                   $Misc->stdProperties())." </td>\n".

  			"</tr>\n".
  			"<tr>\n".

  			  "<th> COMPANY     </th><td> ".$GHtml->formDropDown("usrCompEnt",
      			                                                 $_POST["usrCompEnt"],
      			                                                 $lstCompany,
      			                                                 $Misc->stdProperties())." </td>\n".

  			"</tr>\n".
  			"<tr>\n".

  			  "<th> POS         </th><td> ".$GHtml->formDropDown("usrPosEnt",
    			                                                   $_POST["usrPosEnt"],
    			                                                   $lstPos,
    			                                                   $Misc->stdProperties())." </td>\n".

  			"</tr>\n".
  			"<tr>\n".

  			  "<th> DEPARTMENT  </th><td> ".$GHtml->formDropDown("usrDeptEnt",
      			                                                 $_POST["usrDeptEnt"],
      			                                                 $lstDept,
      			                                                 $propGroup)." </td>\n".

  			"</tr>\n".
  			"<tr>\n".

  			  "<th> STATUS      </th><td> ".$GHtml->formDropDown("usrStsEnt",
      			                                                 $_POST["usrStsEnt"],
      			                                                 $lstStatus,
      			                                                 $Misc->stdProperties())." </td>\n".

  			"</tr>\n".
  			"</table><br/>\n";

  $Db->dc();
}else{

  $Misc->usrDieJs("Error: Db connection failed");
}

?>